import { defineStore } from 'pinia'
import { getReadListAPI } from '../api/department_msg'
export const msgInfo = defineStore('msginfo', {
  state: () => {
    return {
      msgList: '',
    }
  },
  actions: {
    async msgInfo(id) {
      const res = await getReadListAPI({ id })
      this.msgList = JSON.parse(res.data.data.read_list)
    }
  },
  persist: true
}
)